<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/mytag.jspf"%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>user</title>
<script type="text/javascript">
	$("#grid3").jqGrid({
		pager:"#pager3",
		url:"management/vip/hairdopage",
		colNames:["会员卡号","姓名","性别","手机号","本次美发时间","建议下次美发时间","操作"],
	   	colModel:[
	   		{name:"vipNo", width:50},
	   		{name:"name",width:50},
	   		{name:"sex",width:20,formatter: "select", editoptions:{value:"M:男;F:女"}},
	   		{name:"phoneNo",width:50},
	   		{name:"haircutDate",width:50,formatter:"date", formatoptions: {newformat:'Y-m-d'}},
	   		{name:"suggestNextHaircutDate",width:50,formatter:"date", formatoptions: {newformat:'Y-m-d'}},
	   		{name:"ctrl",width:50,formatter:function(cellvalue, options, rowObject){
	   			var btns = "<div class='am-btn-group am-btn-group-xs'>";
	   			if(rowObject.hairdoRecordId)
	   				btns+="<a href='management/vip/hairdodetail/"+rowObject.hairdoRecordId+"' class='am-btn am-btn-default' title='详情'><span class='am-icon-edit'></span>详情</a>";
	   			//btns+="<a href='management/vip/hairdoedit/"+rowObject.hairdoRecordId+"' class='am-btn am-btn-default' title='修改'><span class='am-icon-edit'></span>修改</a>";
	   			btns+="</div>";
	   			return btns;
	   		}},
	   	]
	});
	
	$("#grid4").jqGrid({
		pager:"#pager4",
		url:"management/vip/mdsebuypage",
		colNames:["会员卡号","姓名","性别","手机号","商品名称","购买数量","商品类别"],
	   	colModel:[
	   		{name:"vipNo", width:50},
	   		{name:"name",width:50},
	   		{name:"sex",width:20,formatter: "select", editoptions:{value:"M:男;F:女"}},
	   		{name:"phoneNo",width:50},
	   		{name:"mdseName",width:50},
	   		{name:"buyNum",width:50},
	   		{name:"category",width:50},
	   	]
	});
	$(function(){ 
	    $("#searchBtn").click(function(){
	        $("#grid3").jqGrid('setGridParam',{ 
	            postData:$("#queryForm").serializeJson(), //发送数据
	            page:1
	        }).trigger("reloadGrid"); //重新载入 
	        $("#grid4").jqGrid('setGridParam',{ 
	            postData:$("#queryForm").serializeJson(), //发送数据
	            page:1
	        }).trigger("reloadGrid"); //重新载入 
	    }); 
	});
</script>
</head>

<body>
		<ol class="am-breadcrumb am-breadcrumb-slash am-padding" style="margin-bottom: 0px;">
			<li><a href="management/index">首页</a></li>
			<li class="am-active">会员消费记录</li>
		</ol>
		<div class="am-g">
			<form id="queryForm">
			<div class="am-u-md-4">
				<div class="am-input-group am-input-group-sm">
					<input type="text" name="vipNo" class="am-form-field" placeholder="请输入会员号查询" ><span class="am-input-group-btn"><button class="am-btn am-btn-default" type="button" id="searchBtn">搜索</button></span>
				</div>
			</div>
			</form>
		</div>
		
	<div data-am-widget="tabs" class="am-tabs am-tabs-default">
	  <ul class="am-tabs-nav am-cf">
	    <li class="">
	      <a href="[data-tab-panel-2]">服务记录</a>
	    </li>
	    <li class="">
	      <a href="[data-tab-panel-3]">商品购买记录</a>
	    </li>
	  </ul>
	  	<div class="am-tabs-bd">
		  	<div data-tab-panel-2 class="am-tab-panel ">
		  				<div class="am-g am-padding-vertical">
							<div class="am-u-md-12"><table id="grid3"></table><div id="pager3"></div></div>
						</div>
		  	</div>
		  	<div data-tab-panel-3 class="am-tab-panel ">
		  				<div class="am-g am-padding-vertical">
							<div class="am-u-md-12"><table id="grid4"></table><div id="pager4"></div></div>
						</div>
		  	</div>
		</div>
	</div>
	
</body>
</html>
